﻿namespace CodeSnippet.Formats
{
    /// <summary>
    /// Generates color-coded HTML 4.01 from AutoIt source code.
    /// </summary>
    /// <remarks>
    /// NOTE: This is work in progress and is not complete for use.
    /// </remarks>
    public class AutoIt : VisualBasicFormat
    {
        #region Properties
        /// <summary>
        /// Regular expression string to match comments (#comments-start and #comments-end). 
        /// </summary>
        protected override string CommentRegex
        {
            get { return @"(?:;\s*).*?(?=\r|\n)|(?:(#comments-start|#cs).*?(#comments-end|#ce)\s).*?(?=\r|\n)"; }
        }
        /// <summary>
        /// The list of AutoIt keywords.
        /// </summary>
        protected override string Keywords
        {
            get
            {
                return "False True ContinueCase ContinueLoop Default Dim Global Local Const Do Until "
                       + "Enum Exit ExitLoop For To Step Next For In Next Func Return EndFunc Func "
                       + "OnAutoItExit OnAutoItStart EndFunc If Then ElseIf Else EndIf ReDim Select "
                       + "Case EndSelect Switch EndSwitch While WEnd With EndWith";
            }
        }
        /// <summary>
        /// The list of AutoIt preprocessors.
        /// </summary>
        protected override string Preprocessors
        {
            get
            {
                return @"#\s*include #\s*include-once #\s*NoTrayIcon #\s*RequireAdmin";
            }
        }
        #endregion Properties
    }
}
